//-----------------------------------------------------------------------------
//	File: mgui_2d.c
//	Author: xialing
//		2d of mgui
//-----------------------------------------------------------------------------

#ifndef __MGUI_2D_H__
#define __MGUI_2D_H__

#include "mgui_config.h"

//-----------------------------------------------------------------------------
//	mgui_draw_hline - draw a horizontal line
//		@x0: start x position
//		@y: start y position
//		@x1: end x position
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_hline(uint16_t x0, uint16_t y, uint16_t x1, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_draw_vline - draw a vertical line
//		@x: start x position
//		@y0: start y position
//		@y1: end y position
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_vline(uint16_t x, uint16_t y0, uint16_t y1, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_draw_rect - draw a rectangle
//		@x0: start x position
//		@y0: start y position
//		@x1: diagonal x position
//		@y1: diagonal y position
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_rect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_draw_fullrect - draw a full rectangle
//		@x0: start x position
//		@y0: start y position
//		@x1: diagonal x position
//		@y1: diagonal y position
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_fullrect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_clear_area - clear area
//		@x0: start x position
//		@y0: start y position
//		@x1: diagonal x position
//		@y1: diagonal y position
//-----------------------------------------------------------------------------
void mgui_clear_area(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);

//-----------------------------------------------------------------------------
//	mgui_draw_line - draw a line
//		@x0: start x position
//		@y0: start y position
//		@x1: end x position
//		@y1: end y position
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_line(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_draw_circle - draw a circle
//		@x: the centre of a circle x position
//		@y: the centre of a circle y position
//		@r: the radius of a circle
//		@c: 0 or 1
//-----------------------------------------------------------------------------
void mgui_draw_circle(uint16_t x, uint16_t y, uint16_t r, uint8_t c);

//-----------------------------------------------------------------------------
//	mgui_draw_bmp - mgui draw a bmp
//		@b: bmp
//-----------------------------------------------------------------------------
void mgui_draw_bmp(uint8_t *b, uint16_t x, uint16_t y);

#endif
